package org.jeecg.modules.htxincailiao.area.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.htxincailiao.area.entity.HTArea;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * @Description: ht_area
 * @Author: jeecg-boot
 * @Date:   2021-06-10
 * @Version: V1.0
 */
public interface HTAreaMapper extends BaseMapper<HTArea> {

    @Select("<script>" +
            "SELECT * FROM ht_area WHERE parent_id=#{parentId}" +
            "</script>")
    List<HTArea> queryByParentId(@Param("parentId") String parentId);

    @Select("<script>" +
            "SELECT * FROM ht_area WHERE name=#{name}" +
            "</script>")
    List<HTArea> queryByName(@Param("name") String name);

    @Select("<script>" +
            "SELECT * FROM ht_area WHERE name like '%{name}%'" +
            "</script>")
    List<HTArea> fuzzyQueryByName(@Param("name") String name);
}
